<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/Css/reset.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/Css/zh-cn-system.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/Css/table_form.css" />
<script type="text/javascript" src="/Public/Js/jquery.min.js"></script>
<script type="text/javascript" src="/Public/Js/jquery.form.js"></script>
<script src="/Public/Js/main.js"></script>
<script type="text/javascript" src="/Public/Js/artDialog/jquery.artDialog.js?skin=default"></script>
<script type="text/javascript" src="/Public/Js/artDialog/plugins/iframeTools.js"></script>
<script type="text/javascript">
$(function(){
	$('#myform').ajaxForm({
		beforeSubmit:  checkForm,
		success:       complete,
		dataType: 'json'
	});
	function checkForm(){
		var opwd = $('#old_password').val(),
			npwd = $('#new_password').val(),
			cpwd = $('#new_pwdconfirm').val();
			
		if(opwd==''){
			checkInfo('old_password','原密码不能为空');
			$('#old_password').focus();
			return false;
		}else if(npwd.length < '5'){
			checkInfo('new_password','新密码不能少于5个字符');
			$('#new_password').focus();
			return false;
		}else if(cpwd != npwd){
			checkInfo('new_pwdconfirm','两次输入的密码不一样');
			$('#new_pwdconfirm').focus();
			return false;
		}else{
			return true;	
		}
	}
	
	var origin = $.artDialog.open.origin;

    function complete(data){
        msg(data.info,data.data);
		$('#old_password').val('');
		$('#new_password').val('');
		$('#new_pwdconfirm').val('');
		//if(data.status==1) setTimeout("location.reload()",1500);
    }
	
})
</script>
</head>
<body>
<div class="pad-lr-10">
<form action="__URL__/password" method="post" id="myform">
<div class="pad-10">
<div id="div_setting_1" class="contentList pad-10">
<table width="100%"  class="table_form">
  <tr>
    <th width="120">用户名：</th>
    <td>{$_SESSION.admin_user} </td>
  </tr>
  <tr>
    <th>原密码：</th>
    <td><input type="password" class="input-text" name="old_password" id="old_password" size="30"/><span class="onShow"></span></td>
  </tr>
  <tr>
    <th>新密码：</th>
    <td><input type="password" class="input-text" name="new_password" id="new_password" size="30" /><span class="onShow"></span></td>
  </tr>
  <tr>
    <th>确认密码：</th>
    <td><input type="password" class="input-text" name="new_pwdconfirm" id="new_pwdconfirm" size="30" /><span class="onShow"></span></td>
  </tr>
  <tr>
    <th>&nbsp;</th>
    <td>
    <input name="id" value="{$_SESSION['admin_id']}" type="hidden" />
    <input name="dosubmit" type="submit" value="确定修改" class="button">
    </td>
  </tr>
</table>

</div>
</form>
</form>
</div>
</body>
</html>